From 536424459d3743723bd77365a8a844399be49b8b Mon Sep 17 00:00:00 2001 From: "adsharma@los-vmm.sc.intel.com" Date: Wed, 17 Aug 2005 11:21:37 -0800 Subject: [PATCH] Unmap domain page on exit Signed-off-by: Yunhong Jiang Signed-off-by: Arun Sharma --- xen/arch/x86/shadow32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/shadow32.c b/xen/arch/x86/shadow32.c index 8f7414a8a7..1f6d6bb133 100644 --- a/xen/arch/x86/shadow32.c +++ b/xen/arch/x86/shadow32.c @@ -1917,8 +1917,10 @@ static int snapshot_entry_matches( snapshot = map_domain_page(smfn); if (__copy_from_user(&gpte, &guest_pt[index], - sizeof(gpte))) + sizeof(gpte))) { + unmap_domain_page(snapshot); return 0; + } // This could probably be smarter, but this is sufficent for // our current needs. -- 2.30.2